Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding script driven font loading example for pdfdom #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

woodyhayday
Copy link

I've added an example of loading fonts from in-script (like load_fonts.php does via command line). Based on the many stack overflow questions I hit, I think this may be useful for some users who (like we did) need to install fonts on the fly.

@bsweeney
Copy link
Member

bsweeney commented Feb 1, 2020

The latest version of Dompdf supports numeric font weights. I wonder how much work it would be to update the script to do that?

Also, I wonder if we can simplify things a bit by calling FontMetrics::registerFont in place of some of the logic currently in the script.

Might be worthwhile to merge this with load_font.php so that it supports both command-line and script execution. We could try SAPI detection to determine whether or not to execute the installation method.

@woodyhayday
Copy link
Author

The latest version of Dompdf supports numeric font weights. I wonder how much work it would be to update the script to do that?

Not sure how much work to add numeric font weight support - though as this is based on load_fonts.php I suspect that'd need it adding also?

Also, I wonder if we can simplify things a bit by calling FontMetrics::registerFont in place of some of the logic currently in the script.

Good point.

Might be worthwhile to merge this with load_font.php so that it supports both command-line and script execution. We could try SAPI detection to determine whether or not to execute the installation method.

I found it quite useful as a standalone script, but agree, could be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants